package com.opennetexam.manager.bussinessservice;

import com.opennetexam.manager.databasemodel.ExamSubject;
import com.opennetexam.manager.enums.*;
import com.opennetexam.manager.mapper.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 考试计划导入逻辑
 * @author 奶茶
 * Created by on 2018/9/25 11:33.
 */
@Service
public class ExamPlanBussinessService {

    private static final Logger logger = LoggerFactory.getLogger(ExamPlanBussinessService.class);

    @Autowired
    private ExamSubjectMapper examSubjectMapper;

    @Value("${ExamSiteURL}")
    private String examSiteURL;
    @Value("${SystemAdmin}")
    private String systemAdmin;

    /**
     * 查询当前计划下未下载和已下载未生成试卷的所有的科目
     * @param appID
     * @param examPlanID
     * @return
     */
    public List<ExamSubject> findExamSubjectPaperNotGenerate(String appID,String examPlanID){
        return examSubjectMapper.findSubjectList(appID, examPlanID,SubjectPaperStatus.DownloadCompleteAndPaperGenerate.getPrefix());
    }

}
